/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package factory2;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
import javax.swing.Timer;

/**
 *
 * @author wida46984148
 */
public class PGame00 extends BasicGameState {

    Timer timer;
    public static final int ID = 9;
    Image imatgeFons;
    StateBasedGame state;
    int cnt = 0;

    public void init(GameContainer container, StateBasedGame game) throws SlickException {
        this.state = game;
        imatgeFons = new Image("src/data/win.jpg");

    }

    public void update(GameContainer gc, StateBasedGame game, int delta) throws SlickException {
        cnt++;
        if (cnt > 5) {
            gc.sleep(2500);
            gc.exit();
        }
    }

    public void render(GameContainer gc, StateBasedGame game, Graphics g)
            throws SlickException {
        imatgeFons.draw(0, 0);


    }

    @Override
    public int getID() {
        return ID;

    }
}
